﻿using System.Linq;
using System.Web.Mvc;

namespace Table.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        public ActionResult Index()
        {
            var db = new productEntities();
            var model = db.Groups.ToList();
            return View(model);
        }

        public JsonResult Search()
        {
            var db = new productEntities();
            var model = db.Groups.Where(m => m.ParentID == 626).ToList();
            return Json(model, JsonRequestBehavior.AllowGet);
        }

    }
}
